<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">

	<ui:composition template="../template.xhtml">
	
		
		<ui:define name="conteudo">
			<h:form id="combustivelForm">
				<p:messages id="message" showDetail="true" showSummary="false" />
				<h:panelGrid columns="4">
					<h:outputLabel value="Perfil: " />
					<h:inputText value="#{combustivelMB.combustivel.dsCombustivel}" />
					<p:commandButton action="#{combustivelMB.buscar}" value="Buscar" update="combustivelForm"/>
					<p:commandButton value="Novo" action="#{combustivelMB.paginaNovo}"/>
				</h:panelGrid>
				
				<p:dataTable 
						value="#{combustivelMB.combustivelList}" 
						var="comb" 
						emptyMessage="Nenhum Combustivel Encontrado."
						rows="10"
						id="tabela"
						rowStyleClass="#{empty rowIx or rowIx mod 2 ne 0 ? 'even-row' : 'odd-row'}" 
						rowIndexVar="rowIx">
						<p:column>
							<f:facet name="header">
								Combustivel
							</f:facet>
							<h:outputText value="#{comb.dsCombustivel}" />
						</p:column>
						
					</p:dataTable>
			</h:form>
		</ui:define>
	
	</ui:composition>
</html>